<?php

class Database extends PDO {

    private $engine;
    private $host;
    private $database;
    private $user;
    private $pass;

    public function __construct() {
	$this->engine = 'mysql';
	$this->host = '127.0.0.1';
	$this->database = 'server';
	$this->user = 'root';
	$this->pass = '';
//	$options = array(
//			PDO::ATTR_PERSISTENT => true, 
//			PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
//		);
	$dns = $this->engine . ':dbname=' . $this->database . ";host=" . $this->host;
	try {
	    parent::__construct($dns, $this->user, $this->pass,$options);
	} catch (PDOException $exc) {
//	    die("Error!: " . $exc->getMessage() . "<br/>");
//	    var_dump($exc);
	    die();
	}
    }

}

?>